//package com.czf.testmodele.time.quartz;
//
//import org.quartz.*;
//import org.quartz.impl.StdSchedulerFactory;
//
//import java.util.concurrent.TimeUnit;
//
///**
// * @author zfChen
// * @create 2022/6/8 15:22
// */
//public class MyScheduler {
//
//    public static void main(String[] args) throws SchedulerException, InterruptedException {
//        SchedulerFactory schedulerFactory = new StdSchedulerFactory();
//        Scheduler scheduler = schedulerFactory.getScheduler();
//        JobDetail jobDetail = JobBuilder.newJob(PrintJob.class).withIdentity("job1", "group1").build();
//
//        Trigger trigger = TriggerBuilder.newTrigger().withIdentity("trigger1","triggerGroup1")
//                .startNow()
//                .withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(1).repeatForever()).build();
//        scheduler.scheduleJob(jobDetail,trigger);
//        System.out.println("--------scheduler start ! ------------");
//        scheduler.start();
//
//        //睡眠
//        TimeUnit.SECONDS.sleep(10);
//        scheduler.shutdown();
//        System.out.println("--------scheduler shutdown ! ------------");
//
//    }
//}
